
function uploadPreview() {
    console.log('-------');
    // 预览图片的标签
    var uploadPreview = document.querySelector('.img-rounded');
    console.log('uploadPreview', uploadPreview);
    // 上传图片的input框
    var uploadInp = document.querySelector('.file-inp');
    console.log('uploadInp', uploadInp);
    uploadInp && uploadInp.addEventListener('change', function (e) {
        console.dir('e.target', e.target);
        if (e.target.files[0]) {
            uploadPreview.src = window.URL.createObjectURL(e.target.files[0]);
        }
    })
}
uploadPreview()


